﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Drawer.Controls;

namespace DrawerGeneral
{
    public class WrapperTransporterClass : MarshalByRefObject
    {
        public DelegateTestFromServerToClientTransporter DelegateTestFromServerToClient;
        public void RunTestFromServerToClientTransporter(String msg)
        {
            DelegateTestFromServerToClient(msg);
        }

        /// <summary>
        /// Delegate which is linked to another handler in client
        /// </summary>
        public DelegateSendMessageToClientTransporter DelegateSendMessageToClient;
        /// <summary>
        /// Run the delegate
        /// </summary>
        /// <param name="msg"></param>
        public void RunSendMessageToClientTransporter(String msg)
        {
            DelegateSendMessageToClient(msg);
        }

        public DelegateAddVisualElementTransporter DelegateAddVisualElement;
        public void RunAddVisualElementTransporter(CanvasChildrenChangeEventArgs e)
        {
            DelegateAddVisualElement(e);
        }

        public DelegateRemoveVisualElementTransporter DelegateRemoveVisualElement;
        public void RunRemoveVisualElementTransporter(CanvasChildrenChangeEventArgs e)
        {
            DelegateRemoveVisualElement(e);
        }

        public DelegateEditVisualElementTransporter DelegateEditVisualElement;
        public void RunEditVisualElementTransporter(CanvasChildEditEventArgs e)
        {
            DelegateEditVisualElement(e);
        }
    }
}
